package com.mergedannotations;

import com.mergedannotations.eoo.Eoo;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.annotation.MergedAnnotation;
import org.springframework.core.annotation.MergedAnnotations;

/**
 * @author fanxiao  2022/5/17
 * @since 1.0.0
 */
public class AppStarter {

  public static void main(String[] args) {
  	//
//	  AnnotationConfigApplicationContext applicationContext =
//			  new AnnotationConfigApplicationContext(AppConfig.class);

	  MergedAnnotation<EooComponent> of = MergedAnnotation.of(EooComponent.class);
	  System.out.println(of.getDefaultValue("value"));
	  EooComponent declaredAnnotation = Eoo.class.getDeclaredAnnotation(EooComponent.class);
	  MergedAnnotation<EooComponent> from = MergedAnnotation.from(declaredAnnotation);
	  String simpleName = from.synthesize().annotationType().getSimpleName();
	  System.out.println(simpleName);
  }
}